package com.lottery.game.core.modules.service.game;

/**
 * @author : yinlin
 * @version : 1.0
 * Description :
 * Copyright : Copyright (c) 2018
 * Company : KeRuYun Technology(Beijing) Chengdu Co. Ltd.
 * @date : 2018/6/14 下午1:59
 * @link : com.keruyun.checkout.biz.service.LockService
 */
public interface LockService {

    boolean lock(String key);

    boolean lock(String key, String value, long expire);

    boolean lock(String key, long expire);

    boolean tryLock(String key);

    boolean tryLock(String key, long expire);

    boolean tryLock(String key, String value, long expire);

    boolean unlock(String key);

    boolean unlock(String key, String value);

    String getLockValue(String key);
}
